home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_09_06
/
9n06018a
< prev
next >
Wrap
Text File
|
1991-02-16
|
337b
|
25 lines
#include <stdio.h>
#include <stdlib.h>
main()
{
int rows = 0;
long (*pl)[10];
while (rows < 1) {
printf("Enter number of 10 element rows: ");
scanf("%4d", &rows);
}
pl = malloc(rows * sizeof(*pl));
if (pl == NULL) {
printf("malloc failed\n");
exit(1);
}
pl[0][2] = 1234;
pl[0][9] = 9876;
}